package com.yupi.yuapiinterface;

import com.yupi.yuapiinterface.client.YuApiClient;
import com.yupi.yuapiinterface.model.User;

public class Main {
    public static void main(String[] args) {
        String accessKey = "yuapi";
        String secretKey = "abcdefg";
        YuApiClient apiClient = new YuApiClient(accessKey,secretKey);
        String result1 = apiClient.getNameByGet("上海");
        String result2 = apiClient.getNameByPost("闵行");

        User user = new User();
        user.setUsername("shanhe");
        String result3 = apiClient.getUserNameByPost(user);

        System.out.println(result1);
        System.out.println(result2);
        System.out.println(result3);
    }
}
